﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WBEMINFO._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>WBEM INFO Web Tool</title>
    <link href="wbeminfo.css" type="text/css" rel="stylesheet" />
</head>
<body>
    <form id="mainform" runat="server" method="post" action="Default.aspx"  defaultbutton="SearchButton">
    <div>
    
    <% Handle_Query(); %>
    <% Fill_Class_List(); %>    
    <% Fill_Class_Prop_List(); %>
    <% Fill_Class_Inheritance(); %>
    
    <table  width="800"  border="1" style="border-width:1px;border-style:solid;border-collapse:collapse;">
    <tr>
        <td colspan="4" align="center">
        Input the class name or some key words seperated by a space in the following box, press "Search" to start:
        </td>
    </tr>
    <tr>
        <td colspan="4" align="center">
        Search WBEM Class:
        <asp:TextBox ID="ClassNameInput" runat="server" Width="400px" ></asp:TextBox>
        <asp:Button ID="SearchButton" runat="server"  Text="Search"/>
        <br />
        </td>
    </tr>
    
    <tr>
        <td style="width: 250px"></td>
        <td style="width: 150px"></td>
        <td style="width: 150px"></td>
        <td style="width: 250px"></td>
    </tr>

    <tr>
        <td align="center">Class Search Results</td>
        <td align="center" colspan="2">Class Inheritance Structure</td>
        <td align="center">Properties of Selected Class</td>
    </tr>
    <tr>
        <td style="height: 300px">
            <asp:ListBox id="ClassListBox" runat="server" AutoPostBack="true" CssClass="td_full"/>
        </td>
        <td style="height: 300px" colspan="2">
            <asp:ListBox id="ClassInheritanceBox" runat="server" AutoPostBack="true"  CssClass="td_full"/>
        </td>
        <td style="height: 300px">
            <asp:ListBox id="ClassPropListBox" runat="server" AutoPostBack="true" CssClass="td_full"/>
        </td>
    </tr>

    <tr>
        <td colspan="2" align="center">Selected Class Description</td>
        <td colspan="2" align="center">Selected Property Description</td>
    </tr>
    <tr>
        <td colspan="2" style="height: 300px">
            <table class="td_full" border="0">
            <tr>
                <td class="td_name">Class:</td>
                <td class="td_content">
                    <% if (obj_selected_class != null) Response.Write(obj_selected_class.name);%>
                </td>
            </tr>
            <tr>
                <td class="td_name">Base Class:</td>
                <td class="td_content">
                    <% if (obj_selected_class != null) Response.Write(obj_selected_class.baseName);%>
                </td>
            </tr>
            <tr>
                <td class="td_name">Version:</td>
                <td class="td_content">
                    <% if (obj_selected_class != null) Response.Write(obj_selected_class.ver);%>
                </td>
            </tr>
            <tr>
                <td class="td_name">Path:</td>
                <td class="td_content">
                    <% Print_File_Link(); %>
                </td>
            </tr>
            <tr>
                <td colspan="2" class="td_desc">
                <textarea cols="48" rows="16"><% if (obj_selected_class != null) Response.Write(obj_selected_class.desc);%></textarea>
                </td>
            </tr>
            </table>
        </td>
        <td  colspan="2" style="height: 300px">
        <table class="td_full" border="0">
        <tr>
            <td class="td_name">Property:</td>
            <td class="td_content">
                <% if (obj_selected_prop != null) Response.Write(obj_selected_prop.name);%>
            </td>
        </tr>
        <tr>
            <td class="td_name">Of Class:</td>
            <td class="td_content">
                <% if (obj_selected_class_of_prop != null) Response.Write(obj_selected_class_of_prop.name);%>
            </td>
        </tr>
        <tr>
            <td class="td_name">Defination:</td>
            <td class="td_content">
                <% if (obj_selected_prop != null) Response.Write(obj_selected_prop.fullName);%>
            </td>
        </tr>
        <tr>
            <td class="td_name">Params:</td>
            <td class="td_content">
                <% if (obj_selected_prop != null) Response.Write(obj_selected_prop.param);%>
            </td>
        </tr>
        <tr>
            <td colspan="2" class="td_desc">
            <textarea cols="48" rows="16"><% if (obj_selected_prop != null) Response.Write(obj_selected_prop.desc);%></textarea>
            </td>
        </tr>
        </table>
        </td>
    </tr>
    <tr>
        <td colspan="4" align="center">
        Powered by <a href="mailto:dahai.zhao@hp.com">dahai.zhao@hp.com</a>
        </td>
    </tr>
    </table>
    </div>
    </form>
    
</body>
</html>
